package io.plus.client;

import io.plus.interactive.Node;
import lombok.Data;

import java.nio.channels.AsynchronousSocketChannel;
import java.util.concurrent.CountDownLatch;

@Data
public class ConnectionCompletionVo {

    private ClientAsynchronousSocketChannelContext clientChannelContext = null;

    private Client client = null;

    private boolean isReconnect = false;

    private AsynchronousSocketChannel asynchronousSocketChannel;

    private Node serverNode;

    private String bindIp;

    private Integer bindPort;

    private CountDownLatch countDownLatch = null;

    public ConnectionCompletionVo() {

    }

    public ConnectionCompletionVo(ClientAsynchronousSocketChannelContext clientChannelContext, Client client, boolean isReconnect, AsynchronousSocketChannel asynchronousSocketChannel,
                                  Node serverNode, String bindIp, Integer bindPort) {
        super();
        this.clientChannelContext = clientChannelContext;
        this.client = client;
        this.isReconnect = isReconnect;
        this.asynchronousSocketChannel = asynchronousSocketChannel;
        this.serverNode = serverNode;
        this.bindIp = bindIp;
        this.bindPort = bindPort;
    }

}
